package com.mall4j.cloud.product.service.impl;

import com.mall4j.cloud.api.product.vo.SkuVO;
import com.mall4j.cloud.product.mapper.SkuMapper;
import com.mall4j.cloud.product.model.Sku;
import com.mall4j.cloud.product.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * sku
 *
 * @author JCM
 * @date 2021-04-28 02:09:00
 */
@Service
public class SkuServiceImpl implements SkuService {

    @Autowired
    private SkuMapper skuMapper;

    @Override
    public void save(Sku sku) {
        skuMapper.save(sku);
    }

    @Override
    public SkuVO getById(Long skuId) {
        return skuMapper.getBySkuId(skuId);
    }

    @Override
    public void deleteBySpuId(Long spuId) {
        skuMapper.deleteBySpuId(spuId);
    }
}
